package com.jprocms.module.cms.enums;


import java.util.Arrays;

/**
 * @author jprocms
 * 内容状态  审核状态 0待审核 1通过 2不通过
 */
public enum EnumCommentStatus {
    TO_CHECK(0, "待审核"),

    CHECK_PASS(1, "通过"),
    CHECK_REJECT(2, "不通过");


    private Integer status;
    private String desc;


    EnumCommentStatus(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static EnumCommentStatus getByStatus(Integer status) {
        return Arrays.stream(EnumCommentStatus.values()).filter(item -> item.status.equals(status)).findFirst().orElse(null);
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
